delete from Product_Qty_PriceList where centralProductCode not in ('9999','0000','1111') go delete from Product_Supplier_BarCodes where centralProductCode not in ('9999','0000','1111') go delete from Product_Master where central_Product_Code not in ('9999','0000','1111') go delete from subcategories where Category_ID2 not in (Select SubcategoryID from Product_master where SubcategoryID is not null and central_Product_Code in ('9999','0000','1111')) go delete from Product_Categories_Level2 where Category_ID2 not in (Select Category_ID2 from Product_master where central_Product_Code in ('9999','0000','1111')) go delete from Product_Categories_Level1 where Category_ID1 not in (Select Category_ID1 from Product_master where central_Product_Code in ('9999','0000','1111'))and category_id1 not in (select category_id1 from subcategories) go delete from Product_StockList